package com.sh.data.engine.mbean;

import lombok.Data;

import java.util.Date;

/**
 * @author tyf
 * @description:
 * @date 2020-11-12 16:08
 */
@Data
public class Context {

    private String type;

    private int shutdown;

    private int failNum;

    private int delay;

    private Date lastSyncTime;

    public Context() {
        this.shutdown = 0;
        this.failNum = 0;
        this.delay = 0;
    }

    public void shutDown() {
        this.shutdown = 1;
    }

    public void setLastSyncTime(Date lastSyncTime) {
        this.lastSyncTime = lastSyncTime;
    }

    public void addFailNum() {
        this.failNum++;
    }

    public void setDelay(int delay) {
        this.delay = delay;
    }
}
